package com.jenings.shop.service;

import com.jenings.shop.entity.SPCard;
import com.jenings.shop.mapper.SPCardMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SPCardService {
    @Autowired
    SPCardMapper spCardMapper;
    //查询购物车所有商品
    public List<SPCard> selectAll(){
        List<SPCard> spCardList = spCardMapper.selectAll();
        return spCardList;
    }
    //修改购物车信息
    public boolean updateByte(SPCard spCard){
        return spCardMapper.updateByte(spCard);
    }

    //删除购物车信息
    public boolean delByte(Integer gwcid){
        return spCardMapper.delByte(gwcid);
    }
    //添加购物车
    public boolean insertByte(SPCard spCard){
        return spCardMapper.insertByte(spCard);
    }
}
